
K = 7;
Generator1_b = [1 0 1 1 0 1 1];     % Generator polynomial for out1
Generator2_b = [1 1 1 1 0 0 1];     % Generator polynomial for out2

% Representing the polynomial in octal to be suitable for matlab
Generator1 = str2num(dec2base(bin2dec(num2str(Generator1_b)),8));%#ok
Generator2 = str2num(dec2base(bin2dec(num2str(Generator2_b)),8)); %#ok

trellis_t = poly2trellis(K, [Generator1 Generator2]); % Define trellis.

save trellis_t trellis_t